package com.hoshiibuy.sku.feign;

import com.hoshiibuy.common.rpc.Response;
import com.hoshiibuy.sku.feign.hystrix.HystrixCompanyFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author zhangshuhu
 * @title: CompanyService
 * @projectName hoshiibuy
 * @description: 公司微服务
 * @since 2019-04-28
 */
@FeignClient(name = "hoshiibuy-company", fallback = HystrixCompanyFeignFallback.class)
public interface CompanyService {

    /**
     * 根据id获取
     * @param id ID
     * @return Response
     */
    @RequestMapping(value = "/company/{id}", method = RequestMethod.GET)
    Response getById(@PathVariable("id") Long id);
}

